<template>
  <div>
    <mt-popup
      v-model="popupVisible"
      position="top"
      modal="true"
      style="width: 100%;"
    >
      <div class="StoreModal" id="cityModal1">
        <div>
          <div class="StoreModal_title">
            东莞市
            <div class="hr1"></div>
          </div>
          <div class="StoreModal_select">
            <div class="StoreModal_select_son" @click="SelectCityFunc(this)">东莞全城</div>
            <div class="hr2"></div>
          </div>
        </div>

        <div>
          <div class="StoreModal_title">
            东莞市
            <div class="hr1"></div>
          </div>
          <div class="StoreModal_select">
            <div class="StoreModal_select_son">东莞全城</div>
            <div class="StoreModal_select_son">厚街镇</div>
            <div class="hr2"></div>
          </div>
        </div>

        <div class="More_store">更多猩店，敬请期待</div>
      </div>
    </mt-popup>
    <mt-popup
      v-model="popupVisible2"
      position="top"
      modal="true"
      style="width: 100%;"
    >
      <div class="StoreModal" id="typeModel">
        <div>
          <div class="StoreModal_title">
            东莞市
            <div class="hr1"></div>
          </div>
          <div class="StoreModal_select">
            <div class="StoreModal_select_son">东莞全城</div>
            <div class="StoreModal_select_son">厚街镇</div>
            <div class="StoreModal_select_son">厚街镇</div>
            <div class="StoreModal_select_son">厚街镇</div>
            <div class="StoreModal_select_son">东莞全城</div>
            <div class="StoreModal_select_son">厚街镇</div>
            <div class="StoreModal_select_son">厚街镇</div>
            <div class="StoreModal_select_son">厚街镇</div>
            <div class="StoreModal_select_son">东莞全城</div>
            <div class="StoreModal_select_son">厚街镇</div>
            <div class="StoreModal_select_son">厚街镇</div>
            <div class="StoreModal_select_son">厚街镇</div>
            <!--<div class="hr2"></div>-->
          </div>
        </div>

        <div>
          <div class="StoreModal_title">
            东莞市
            <div class="hr1"></div>
          </div>
          <div class="StoreModal_select">
            <div class="StoreModal_select_son">东莞全城</div>
            <div class="StoreModal_select_son">厚街镇</div>
            <div class="hr2"></div>
          </div>
        </div>
      </div>
    </mt-popup>
    <div class="StoreLinkage">
      <div class="left" @click="ShowArea">广州全城<span class="v"></span></div>
      <div class="mid"></div>
      <div class="right" @click="ShowStore">所有门店<span class="v"></span></div>
    </div>
  </div>
</template>

<script>
  import { Popup } from 'mint-ui'
  import Vue from 'vue'
  Vue.component(Popup.name, Popup)

  export default {
    data () {
      return {
        popupVisible: false,
        popupVisible2: false
      }
    },
    methods: {
      ShowArea () {
        this.popupVisible = true
      },
      ShowStore () {
        this.popupVisible2 = true
      },
      SelectCityFunc (e) {
        console.log(e)
      },
      StoreType (id) {
        this.$emit('on-StoreType-change', id)
      }
    }
  }

</script>

<style scoped>
  .StoreLinkage {
    height: 0.42rem;
    width: 100%;
    background: #1c1c1c;
    position: relative;
    border-bottom: 1px solid rgba(77, 77, 77, .3);
  }
  .left, .right {
    height: 100%;
    width: 50%;
    color: #fff;
    font-size: 0.14rem;
    font-weight: 100;
    text-align: center;
    line-height: 0.42rem;
  }
  .left {
    float: left;
  }
  .right {
    float:  right;
  }
  .mid {
    position: absolute;
    width: 0.01rem;
    height: 0.18rem;
    right: 0;
    left: 0;
    top:0;
    margin:  0px auto;
    margin-top: 0.12rem;
    margin-bottom: 0.12rem;
    background-color: #35363c;
  }
  .v {
    display: inline-block;
    content: '';
    width: 0.08rem;
    height: 0.08rem;
    border-top: 1px solid #fff;
    border-right: 1px solid #fff;
    /* padding-left: 5px; */
    -webkit-transform: rotate(135deg);
    transform: rotate(135deg);
    margin-left: 0.09rem;
    margin-bottom: 0.05rem;
  }

  .StoreModal {
    background-color: #f2f2f2;
    padding: 0.05rem 0.14rem 0.14rem;
    -webkit-overflow-scrolling: touch;
    max-height: 100vh;
    overflow-y: scroll;
    pointer-events: none;
  }
  .StoreModal_title {
    color: #8f8f8f;
    font-size: 0.13rem;
    font-weight: 900;
    height: 0.24rem;
    padding-top: 0.01rem;
    /*padding-bottom: 7px;*/
  }
  .StoreModal_title, .StoreModal_select .StoreModal_select_son{
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-align-items: center;
    -ms-flex-align: center;
    align-items: center;
  }

  .StoreModal_select {
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-flex-flow: row wrap;
    -ms-flex-flow: row wrap;
    flex-flow: row wrap;
    -webkit-justify-content: space-between;
    -ms-flex-pack: justify;
    justify-content: space-between;
  }

  .hr1 {
    height: 1px;
    background-color: #d7d7d7;
    margin-left: 4px;
    -webkit-flex: 1;
    -ms-flex: 1;
    flex: 1;
  }

  .hr2, .StoreModal_select .StoreModal_select_son {
    -webkit-flex-basis: 30%;
    -ms-flex-preferred-size: 30%;
    flex-basis: 30%;
  }

  .StoreModal_select .StoreModal_select_son {
    height: 0.38rem;
    color: #262626;
    font-size: 0.15rem;
    font-weight: 100;
    background-color: #fff;
    border: 1px solid #bababa;
    border-radius: 0.02rem;
    margin-top: 0.1rem;
    text-align: center;
    pointer-events: auto;
  }

  .StoreModal .More_store {
    font-size: 0.12rem;
    color: #8f8f8f;
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-align-items: flex-end;
    -ms-flex-align: end;
    align-items: flex-end;
    -webkit-justify-content: center;
    -ms-flex-pack: center;
    justify-content: center;
    height: 0.38rem;
  }

  .StoreModal_select .StoreModal_select_son{
    display: -webkit-flex;
    display: -ms-flexbox;
    display: flex;
    -webkit-justify-content: center;
    -ms-flex-pack: center;
    justify-content: center;
  }

  .StoreModal_select_son.OnSelect {
    background-color: #e0e0e0;
    border-color: #bcbcbc;
  }

</style>
